Post-merge-review: Fix template-no-nested-landmark: drop port-only section/region#2694
Merged
NullVoxPopuli merged 5 commits intoember-cli:masterfrom Apr 15, 2026
Conversation
Upstream excludes <section> from LANDMARK_ELEMENTS and 'region' from LANDMARK_ROLES. Restore parity — port was over-flagging legitimate nested sections.
e18dc6a to
958884b
Compare
| '<template><header><div role="navigation"></div></header></template>', | ||
| '<template><div role="banner"><div role="navigation"></div></div></template>', | ||
|
|
||
| // `<section>` is not a landmark element per upstream, so nested sections are allowed. |
Contributor
There was a problem hiding this comment.
upstream doesn't matter. what's MDN say?
Contributor
Author
There was a problem hiding this comment.
thanks, changed the comment now — cites https://www.w3.org/WAI/ARIA/apg/patterns/landmarks/examples/HTML5.html directly: <section> only gets the region landmark role when it has an accessible name, otherwise it's generic.
| // `<section>` is not a landmark element per upstream, so nested sections are allowed. | ||
| // `<section>` only gets the `region` landmark role when it has an accessible name | ||
| // (aria-label/aria-labelledby/title). Without one it has the generic role — see | ||
| // https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/section. |
Contributor
There was a problem hiding this comment.
Contributor
Author
There was a problem hiding this comment.
MDN is inconsistent on this — checked the HTML-AAM spec directly: https://www.w3.org/TR/html-aam-1.0/#el-section — "region role if the section element has an accessible name. Otherwise, the generic role."
NullVoxPopuli
requested changes
Apr 14, 2026
NullVoxPopuli
approved these changes
Apr 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
<section>fromLANDMARK_ELEMENTSand'region'fromLANDMARK_ROLESto match upstream<section>elementsTest plan
<section><section>...</section></section>→ valid<div role="region"><div role="region">...</div></div>→ valid<main><nav>...</nav></main>→ still flagged